package com.altfee.example.ColorPicker;

import android.app.Activity;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;

public class ColorPickerActivity extends Activity implements
		OnColorChangedListener {
	TextView mTextView = null;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        LinearLayout layout = (LinearLayout)findViewById(R.id.layout);
        layout.addView(new UniversalColorView(this, this, 0xffff0000));
        mTextView = new TextView(this);
        layout.addView(mTextView);
    }

	@Override
	public void colorChanged(Object source, ColorChooserType type, int color) {
		// TODO Auto-generated method stub
		mTextView.setText(Integer.toHexString(color));
	}
}